package cn.rdq.iknessplatform.service.impl;

import cn.rdq.api.dto.DramaCommentDto;
import cn.rdq.api.po.DramaComment;
import cn.rdq.dao.DramaCommentMapper;
import cn.rdq.iknessplatform.service.DramaCommentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DramaCommentServiceImpl extends ServiceImpl<DramaCommentMapper, DramaComment> implements DramaCommentService {

    @Autowired
    private DramaCommentMapper mapper;

    @Override
    public List<DramaCommentDto> listRootComment(Long dramaId) {
        return mapper.listRootComment(dramaId);
    }

    @Override
    public List<DramaCommentDto> listReplys(Long rootParentId) {
        return mapper.listByRootCommentId(rootParentId);
    }
}
